mongodb = require('mongodb')

server = new mongodb.Server("localhost", 27017, {})

new mongodb.Db('taskDB', server, {})
.open (error, client)->
	return if error
	collection = new mongodb.Collection(client, 'task');
	collection.find (error, cursor)->
		cursor.each (error, task)->
			console.log("id:" + task.id + " name:" + task.name) if task
